package com.hmsproject.datastructures.event;

public class Event {

	private static int eventIdStatic = 0;

	private String eventId;
	private String imageName;
	private static final String IMAGEURL = "http://122.165.107.132:8085/hms/resources/image/";
	private Double longtitude;
	private Double lalititude;
	private String eventName;
	private EventSchedule eventSchedule;
	private String eventLocation;

	public String getEventId() {
		return eventId;
	}

	public EventSchedule getEventSchedule() {
		return eventSchedule;
	}

	public String getEventLocation() {
		return eventLocation;
	}

	public Double getLongtitude() {
		return longtitude;
	}

	public void setLongtitude(Double longtitude) {
		this.longtitude = longtitude;
	}

	public Double getLalititude() {
		return lalititude;
	}

	public void setLalititude(Double lalititude) {
		this.lalititude = lalititude;
	}

	public Event(String eventName, String eventLocation,
			EventSchedule eventSchedule) {
		this.eventName = eventName;
		this.eventLocation = eventLocation;
		this.eventSchedule = eventSchedule;
		this.eventId = eventIdStatic++ + "";
	}

	public Event(String eventName, String eventLocation,
			EventSchedule eventSchedule, String imageName) {
		this(eventName, eventLocation, eventSchedule);
		this.imageName = IMAGEURL + imageName;
	}

	public Event(String eventName, String eventLocation,
			EventSchedule eventSchedule, String imageName, Double latitude,
			Double longtitude) {
		this.imageName = IMAGEURL + imageName;
		this.lalititude = latitude;
		this.longtitude = longtitude;
	}

	public String getImageName() {
		return imageName;
	}

	public void setImageName(String imageName) {
		this.imageName = imageName;
	}

	public String getEventName() {
		return eventName;
	}

	public void setEventName(String eventName) {
		this.eventName = eventName;
	}

	private Event() {
	}

	@Override
	public String toString() {
		return eventId;
	}

	@Override
	public boolean equals(Object event) {
		return this.eventId.equals(((Event) event).getEventId());
	}

	@Override
	public int hashCode() {
		return eventId.hashCode();
	}

}
